// 开发配置文件

const { merge }  = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.config')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')

const devWebpackConfig = merge(baseWebpackConfig, {
  mode: 'development',
  plugins: [
    new webpack.DefinePlugin({
      // 变量值要求的是一个代码片段
      API_BASE_URL: JSON.stringify('http://XXX.com')
    }),
    new HtmlWebpackPlugin({
      template: './src/index.ejs',
      title: '我是测试的title'
    }),
  ]
})

module.exports = devWebpackConfig